import {
  user,
  home,
  home0,
  reservation,
  reservationSelectItem,
  reservationSelectStore,
  storeIndex,
  storeSelect,
  /* 咨询师端 */
  beautician,
  beauticianHome,
  beauticianFinishInfo,
  beauticianDaily,
  beauticianMonthly,
  stock,
  staffStock,
  beauticianUser,
} from "./views";

export default [{
    path: "/user",
    component: user,
    children: [{
        path: "",
        component: home0,
        name: "home",
        meta: {
          text: "首页",
        },
      },
      {
        path: "reservation",
        component: reservation,
        name: "reservation",
        meta: {
          text: "预约",
        },
      },
      {
        path: "reservation/selectItem",
        component: reservationSelectItem,
        name: "reservationSelectItem",
        meta: {
          text: "选择项目",
        },
      },
      {
        path: "reservation/selectStore",
        component: reservationSelectStore,
        name: "reservationSelectStore",
        meta: {
          text: "选择店铺",
        },
      },

      {
        path: "store/detail/:id",
        component: storeIndex,
        meta: {
          text: "门店",
        },
        props: route => ({
          id: route.params.id,
        }),
        children: [{
          path: "select",
          component: storeSelect,
          meta: {
            text: "选择门店",
          },
        }, ],
      },
    ],
  },
  {
    path: "/beautician",
    component: beautician,
    children: [{
        path: "",
        component: beauticianHome,
        name: "beauticianHome",
        meta:{
          title:'预约'
        }
      },
      {
        path: "finishInfo/:uid",
        component: beauticianFinishInfo,
        name: "beauticianFinishInfo",
        props: route => ({
          uid: route.params.uid,
        }),
        meta:{
          title:'填写信息'
        }
      },
      {
        path: "daily",
        component: beauticianDaily,
        name: "beauticianDaily",
        meta:{
          title:'日报'
        }
      },
      {
        path: "monthly",
        component: beauticianMonthly,
        name: "beauticianMonthly",
        meta:{
          title:'月报'
        }
      },
      {
        path: "stock",
        component: stock,
        name: "beauticianStock",
        meta:{
          title:'库存'
        }
      },
      {
        path: "stock/records/:pid",
        component: staffStock,
        name: "beauticianStaffStock",
        props: route => ({
          pid: route.params.pid,
        }),
        meta:{
          title:'库存记录'
        }
      },
      {
        path: "user",
        component: beauticianUser,
        name: "beauticianUser",
        meta:{
          title:'我的'
        }
      },
    ],
  },
];